from openpyxl import load_workbook
from ddt import data,unpack,ddt,file_data

class Toocls():
    def __init__(self, path, sheetname):
        self.path = load_workbook(path)
        self.sheetname = self.path[sheetname]


    def getdata(self):
        datalist = []
        for line in self.sheetname:
            list = []
            list.append(line[0].value)
            list.append(line[1].value)
            datalist.append(list)
        datalist.pop(0)
        return datalist
if __name__ == '__main__':
    path=r"C:\Users\HP\Desktop\driver.xlsx"
    sheetname='Sheet1'
    dy=Toocls(path,sheetname)
    print(dy.getdata())